﻿
namespace Fayshine.VA.RIAService.Web
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data.Objects.DataClasses;
    using System.Linq;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;


    // The MetadataTypeAttribute identifies areaMetadata as the class
    // that carries additional metadata for the area class.
    [MetadataTypeAttribute(typeof(area.areaMetadata))]
    public partial class area
    {

        // This class allows you to attach custom attributes to properties
        // of the area class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class areaMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private areaMetadata()
            {
            }

            [Include]
            [Association("area", "ID", "ParentID")]
            public EntityCollection<area> area1 { get; set; }

            [Include]
            //[Association("area", "ParentID", "ID")]
            public area area2 { get; set; }

            [Include]
            //[Association("areatype", "AreaTypeID", "ID")]
            public areatype areatype { get; set; }

            public int AreaTypeID { get; set; }

            [Include]
            [Association("gate", "ID", "ParentID")]
            public EntityCollection<gate> gates { get; set; }

            public int ID { get; set; }

            public string Name { get; set; }

            public Nullable<int> ParentID { get; set; }

            public EntityCollection<pos> pos { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies areatypeMetadata as the class
    // that carries additional metadata for the areatype class.
    [MetadataTypeAttribute(typeof(areatype.areatypeMetadata))]
    public partial class areatype
    {

        // This class allows you to attach custom attributes to properties
        // of the areatype class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class areatypeMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private areatypeMetadata()
            {
            }

            [Include]
            //[Association("area", "ID", "AreaTypeID")]
            public EntityCollection<area> areas { get; set; }

            [Include]
            [Association("gate", "ID", "AreaTypeID")]
            public EntityCollection<gate> gates { get; set; }

            public int ID { get; set; }

            public string Name { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies cameraMetadata as the class
    // that carries additional metadata for the camera class.
    [MetadataTypeAttribute(typeof(camera.cameraMetadata))]
    public partial class camera
    {

        // This class allows you to attach custom attributes to properties
        // of the camera class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class cameraMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private cameraMetadata()
            {
            }

            public Nullable<int> AreaID { get; set; }

            public int ChannelID { get; set; }

            public bool Enabled { get; set; }

            [Include]
            //[Association("gate", "AreaID", "ID")]
            public gate gate { get; set; }

            public int ID { get; set; }

            public Nullable<bool> IsComeIn { get; set; }

            public bool IsOnle { get; set; }

            public string Name { get; set; }

            [Include]
            //[Association("vaserver", "VAServerID", "ID")]
            public vaserver vaserver { get; set; }

            public int VAServerID { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies gateMetadata as the class
    // that carries additional metadata for the gate class.
    [MetadataTypeAttribute(typeof(gate.gateMetadata))]
    public partial class gate
    {

        // This class allows you to attach custom attributes to properties
        // of the gate class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class gateMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private gateMetadata()
            {
            }

            [Include]
            //[Association("area", "ParentID", "ID")]
            public area area { get; set; }

            [Include]
            //[Association("areatype", "AreaTypeID", "ID")]
            public areatype areatype { get; set; }

            public Nullable<int> AreaTypeID { get; set; }

            [Include]
            [Association("camera", "ID", "AreaID")]
            public EntityCollection<camera> cameras { get; set; }

            public int ID { get; set; }

            public string Name { get; set; }

            public Nullable<int> ParentID { get; set; }

            [Include]
            [Association("passengerflow", "ID", "GateID")]
            public EntityCollection<passengerflow> passengerflows { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies passengerflowMetadata as the class
    // that carries additional metadata for the passengerflow class.
    [MetadataTypeAttribute(typeof(passengerflow.passengerflowMetadata))]
    public partial class passengerflow
    {

        // This class allows you to attach custom attributes to properties
        // of the passengerflow class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class passengerflowMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private passengerflowMetadata()
            {
            }

            public Nullable<int> Count { get; set; }

            public Nullable<DateTime> DateTime { get; set; }

            [Include]
            public gate gate { get; set; }

            public int GateID { get; set; }

            public Nullable<bool> Gender { get; set; }

            public int ID { get; set; }

            public Nullable<bool> IsIn { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies posMetadata as the class
    // that carries additional metadata for the pos class.
    [MetadataTypeAttribute(typeof(pos.posMetadata))]
    public partial class pos
    {

        // This class allows you to attach custom attributes to properties
        // of the pos class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class posMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private posMetadata()
            {
            }

            public string Description { get; set; }

            public Nullable<int> GoldCount { get; set; }

            public Nullable<double> GoldMoney { get; set; }

            public int ID { get; set; }

            public area area { get; set; }

            public int AreaID { get; set; }

            public Nullable<int> SilerCount { get; set; }

            public Nullable<double> SilverMoey { get; set; }

            public Nullable<int> TradeCount { get; set; }

            public Nullable<DateTime> TradeDate { get; set; }

            public Nullable<double> TradeMoney { get; set; }

            public Nullable<TimeSpan> TradeTime { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies roleMetadata as the class
    // that carries additional metadata for the role class.
    [MetadataTypeAttribute(typeof(role.roleMetadata))]
    public partial class role
    {

        // This class allows you to attach custom attributes to properties
        // of the role class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class roleMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private roleMetadata()
            {
            }

            public int ID { get; set; }

            public string Title { get; set; }

            [Include]
            [Association("user", "ID", "RoleID")]
            public EntityCollection<user> users { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies userMetadata as the class
    // that carries additional metadata for the user class.
    [MetadataTypeAttribute(typeof(user.userMetadata))]
    public partial class user
    {

        // This class allows you to attach custom attributes to properties
        // of the user class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class userMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private userMetadata()
            {
            }

            public string CHNName { get; set; }

            public int ID { get; set; }

            public string Name { get; set; }

            public string Password { get; set; }
                        
            [Include]
            public role role { get; set; }

            public Nullable<int> RoleID { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies vaserverMetadata as the class
    // that carries additional metadata for the vaserver class.
    [MetadataTypeAttribute(typeof(vaserver.vaserverMetadata))]
    public partial class vaserver
    {

        // This class allows you to attach custom attributes to properties
        // of the vaserver class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class vaserverMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private vaserverMetadata()
            {
            }

            public int CustomID { get; set; }

            public Nullable<int> DeviceType { get; set; }

            public Nullable<bool> Enable { get; set; }

            public string HostName { get; set; }

            public int ID { get; set; }

            public string IP { get; set; }

            public string Location { get; set; }

            public string Password { get; set; }

            public string Port { get; set; }

            public string Remarks { get; set; }

            public string SN { get; set; }

            public string UserName { get; set; }
                       
            [Include]
            public vatype vatype { get; set; }

            [Include]
            [Association("camera", "ID", "VAServerID")]
            public EntityCollection<camera> cameras { get; set; }


        }
    }

    // The MetadataTypeAttribute identifies vatypeMetadata as the class
    // that carries additional metadata for the vatype class.
    [MetadataTypeAttribute(typeof(vatype.vatypeMetadata))]
    public partial class vatype
    {

        // This class allows you to attach custom attributes to properties
        // of the vatype class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class vatypeMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private vatypeMetadata()
            {
            }

            public Nullable<int> ChannelCount { get; set; }

            public int ID { get; set; }

            public string Name { get; set; }

            [Include]
            [Association("vaserver", "ID", "DeviceType")]
            public EntityCollection<vaserver> vaservers { get; set; }
        }
    }
}
